package com.zh.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
/**
 * <p>
 * 
 * </p>
 *
 * @author zh
 * @since 2025-03-29
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 账号
     */
    private String no;

    private String name;

    private String password;

    private Integer age;

    private String sex;

    private String phone;

    /**
     * 角色 0超级管理员， 1管理员 2普通账号
     */
    private Integer roleId;

    /**
     * 是否有效 Y/N
     */
    @TableField("isValid")
    private String isValid;

    @Override
    public String toString() {
        return "User{" +
            "id = " + id +
            ", no = " + no +
            ", name = " + name +
            ", password = " + password +
            ", age = " + age +
            ", sex = " + sex +
            ", phone = " + phone +
            ", roleId = " + roleId +
            ", isValid = " + isValid +
        "}";
    }
}
